var a = 1; // NaN
var b = 'foo';
var c = true; // false
var d = undefined;
var e = null;
var f = undefined;
// const g: symbol = Symbol()
// 剩余参数语法允许我们将一个不定数量的参数表示为一个数组 ...args
var arr1 = [1, 2, 3];
var arr2 = [1, 2, 3];
function sum() {
    var args = [];
    for (var _i = 0; _i < arguments.length; _i++) {
        args[_i] = arguments[_i];
    }
    // 确保每个参数都是数字
    return args.reduce(function (prev, current) { return prev + current; }, 0);
}
console.log(sum(1, 2, 3));
console.log('tsdemo', sum(1, 2, 3));
